function hash = string2hash (string)
    str = zeros(1, length(string));
    for i = 1:str
        str = string(1, i);
    end
    hash = 5381*ones(size(str,1),1);
    for i=1:size(str,2)
      hash = mod(hash*33 + str(:,i), (2^32-1));
    end
end